encoding/json uses struct tags to control JSON field names and behavior. Implement json.Marshaler and json.Unmarshaler interfaces for custom serialization logic.
Unexported fields are silently ignored — always export fields you want serialized
interface{} numbers unmarshal as float64 by default — use UseNumber() for large integers
omitempty omits zero values: 0, false, "", nil — careful with intentional zero values
Anonymous embedded structs promote their fields to the parent — useful but can cause field collisions
json.RawMessage allows deferring or passing through raw JSON without parsing